﻿<!DOCTYPE html>
<html ng-app="demoApp">
<head>
    <title id="Description">jqxExpander Directive for AngularJS</title>
    <link rel="stylesheet" type="text/css" href="../../jqwidgets/styles/jqx.base.css" />
    <script type="text/javascript" src="../../scripts/angular.min.js"></script>
    <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxexpander.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxangular.js"></script>
    <script type="text/javascript" src="../../scripts/demos.js"></script>
    <script type="text/javascript">
        var demoApp = angular.module("demoApp", ["jqwidgets"]);
        demoApp.controller("demoController", function ($scope) {
            $scope.people = [{
                Id: 1,
                FirstName: "Nancy",
                LastName: "Davolio",
                Title: "Sales Representative",
                Age: 32
            },
            {
                Id: 2,
                FirstName: "Andrew",
                LastName: "Fuller",
                Title: "Sales Manager",
                Age: 55
            }
            ];
            $scope.person = $scope.people[0];
            $scope.changeContent = function () {
                $scope.person = $scope.people[1];
            }
        });
    </script>
</head>
<body>
    <div ng-controller="demoController">
        <jqx-expander jqx-width="'200px'" jqx-height="'150px'">
            <div>{{person.FirstName}}</div>
            <div>
                Id: {{person.Id}}
                <br />
                Name: {{person.FirstName}}
                <br />
                Last Name: {{person.LastName}}
                <br />
                Title: {{person.Title}}
                <br />
                Age: {{person.Age}}
            </div> 
         </jqx-expander>
        <br />
        <jqx-button jqx-on-click="changeContent()">Change Content</jqx-button>
    </div>
</body>
</html>
